package com.wuyangnju.lj.simulation.master.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wuyangnju.lj.simulation.master.service.ComputionService;

@SuppressWarnings("serial")
public class SurvivalCountServlet extends HttpServlet {

	private ComputionService computionService;
	{
		computionService = ComputionService.get();
	}

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		resp.setContentType("text/plain");

		resp.getWriter().println(computionService.survivalCount());
	}
}
